marko
Version:
UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.
16 lines (12 loc) • 347 B
JavaScript
import { types as t } from "@marko/compiler";
import write from "../util/html-out-write";
import withPreviousLocation from "../util/with-previous-location";
export default function (path) {
const { node } = path;
path.replaceWith(
withPreviousLocation(
write`<![CDATA[${t.stringLiteral(node.value)}]]>`,
node,
),
);
}